package com.jxgk.mapper;

import com.jxgk.pojo.Dept;
import com.jxgk.pojo.Dto;
import com.jxgk.pojo.User;
import com.jxgk.pojo.Zw;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

@Mapper
public interface UserMapper extends tk.mybatis.mapper.common.Mapper<User>{
@Delete("delete from user where uid=#{uid}")
    void del(Integer id);
@Select("select *  from dept")
    List<Dept> findDept();
@Select("select *  from zw")
    List<Zw> findZw();
@Select("select  * from  zw z,user u,dept d where u.zid=z.zid and u.did=d.did")
    List<Dto> findAll();



    @Select("select  * from  user where uid=#{uid}")
    User fid(Integer uid);
}
